package com.mchina.myMaven.rest.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;

/**
 * Created by IntelliJ IDEA.
 * User: 徐书兵
 * Date: 11-12-6
 * Time: 下午2:22
 */
@Controller
public class MainController {
    private static final String XML_VIEW_NAME = "employees";

    @RequestMapping(method = RequestMethod.GET, value = "/toEmployee/")
    public ModelAndView getEmployee(@PathVariable String id) {

        return new ModelAndView(XML_VIEW_NAME);
    }

    @RequestMapping(method = RequestMethod.GET, value = "/main/")
    public ModelAndView main() {

        return new ModelAndView("main");
    }
}
